<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/animate.min.css">
    <script src="../js/vue.js"></script>
    
    <style>
        #main {
            width: 300px;
            height: 300px;
            margin: auto;
        }

        .nav {
            display: flex;
            justify-content: space-around;
            width: 300px;
        }

        .nav-item {
            width: 80px;
            height: 30px;
            background-color: pink;
            border-radius: 10px;
            line-height: 30px;
            text-align: center;
            color: brown;
            cursor: pointer;
        }
        .active{
            background: darkred;
            color:#fff;
        }
        .mbbox{
            margin-top: 20px;
            overflow: hidden;
            width: 300px;
            height: 100px;

        }
        .content{
            background-color: bisque;
            color: #000;
            font-size: 36px;
            width: 300px;
            height: 100px;
            line-height: 100px;
            text-align: center;
            border-radius: 10px;
        }
    </style>
</head>

<body>
    <div id="main">
        <div class="nav">
            <div class="nav-item" @click="cur=0" :class="cur==0?'active animated bounce':''">1</div>
            <div class="nav-item" @click="cur=1" :class="cur==1?'active animated bounce':''">2</div>
            <div class="nav-item" @click="cur=2" :class="cur==2?'active animated bounce':''">3</div>
        </div>
        <div class="mbbox">
            <div class="content animated bounce" :style="{display:cur==0?'block':'none'}">one</div>
            <div class="content animated bounce" :style="{display:cur==1?'block':'none'}">two</div>
            <div class="content animated bounce" :style="{display:cur==2?'block':'none'}">three</div>
        </div>
    </div>

    <script>
        const vm = new Vue({
            data:{
                cur: 0
            }
        }).$mount('#main')
    </script>
</body>

</html>